import React from "react";
import {Col, Collapse, Divider, Row} from "antd";
import FileLink from "../FileLink";
import "./detail.scss";

function Detail(props) {
    const {Panel} = Collapse;
    const recordTask = props["recordTask"];

    const getPropertyOrgRelation = (relationCode) => {
        switch (relationCode) {
            case 0:
                return "租赁";
            case 1:
                return "隶属";
            case 2:
                return "自营";
            case 3:
                return "共有";
            case 4:
                return "抵押";
            case 5:
                return "其他";
            default:
                return "";
        }
    }

    const getLandUseNature = (landUseNature) => {
        switch (landUseNature) {
            case 1:
                return "机关单位";
            case 2:
                return "企业";
            case 3:
                return "公共";
            case 4:
                return "小区";
            case 5:
                return "个人";
            case 6:
                return "租赁";
            case 7:
                return "自用地";
            default:
                return "";
        }
    }

    const getParkLotScale = (parkLotScale) => {
        switch (parkLotScale) {
            case 1:
                return "特大型";
            case 2:
                return "大型";
            case 3:
                return "中型";
            case 4:
                return "小型";
            default:
                return "";
        }
    }

    return (
        <Collapse defaultActiveKey={['1', '2', '3', '4']} ghost>
            <Panel header="经营管理者基本信息" key="1">
                <Divider className={"collapse-panel-divider"}/>

                <Row>
                    <Col span={24}>
                        <span>停车场名称：</span>
                        <span>{recordTask?.name}</span>
                    </Col>
                </Row>

                <Row className={"record-task-row"}>
                    <Col span={8}>
                        <span>经营管理单位：</span>
                        <span>{recordTask?.manageOrgName}</span>
                    </Col>

                    <Col span={8}>
                        <span>经营管理单位电话：</span>
                        <span>{recordTask?.manageOrgPhone}</span>
                    </Col>

                    <Col span={8}>
                        <Row>
                            <Col span={10}>
                                <span>管理单位工商营业执照:</span>
                            </Col>
                            <Col span={14}>
                                <FileLink fileName={"管理单位工商营业执照"}/>
                            </Col>
                        </Row>
                    </Col>
                </Row>

                <Row className={"record-task-row"}>
                    <Col span={8}>
                        <span>产权单位：</span>
                        <span>{recordTask?.propertyOrgName}</span>
                    </Col>

                    <Col span={8}>
                        <span>产权单位电话：</span>
                        <span>{recordTask?.propertyOrgPhone}</span>
                    </Col>

                    <Col span={8}>
                        <Row>
                            <Col span={9}>
                                <span>停车场产权单位证明:</span>
                            </Col>

                            <Col span={15}>
                                <FileLink fileName={"停车场产权单位证明"}/>
                            </Col>
                        </Row>
                    </Col>
                </Row>

                <Row className={"record-task-row"}>
                    <Col span={8}>
                        <span>与产权单位关系：</span>
                        <span>{getPropertyOrgRelation(recordTask?.propertyOrgRelation)}</span>
                    </Col>

                    <Col span={16}>
                        <Row>
                            <Col span={4}>
                                <span>使用权证明材料：</span>
                            </Col>

                            <Col span={10}>
                                <FileLink fileName={"使用权证明材料"}/>
                                <FileLink fileName={"使用权证明材料"}/>
                            </Col>
                        </Row>
                    </Col>
                </Row>

                <Row className={"record-task-row"}>
                    <Col span={8}>
                        <span>经办人：</span>
                        <span>{recordTask?.managerName}</span>
                    </Col>

                    <Col span={8}>
                        <span>经办人手机：</span>
                        <span>{recordTask?.managerPhone}</span>
                    </Col>

                    <Col span={8}>
                        <Row>
                            <Col span={4}>
                                <span>介绍信：</span>
                            </Col>

                            <Col span={10}>
                                <FileLink fileName={"单位介绍信"}/>
                            </Col>
                        </Row>
                    </Col>
                </Row>

                <Row className={"record-task-row"}>
                    <Col span={8}>
                        <span>是否收费：</span>
                        <span>{recordTask?.isCharge === 0 ? "否" : "是"}</span>
                    </Col>

                    <Col span={8}>
                        <span>是否有停车费优惠：</span>
                        <span>{recordTask?.isParkFeeDiscount === 0 ? "否" : "是"}</span>
                    </Col>

                    <Col span={8}>
                        <span>停车优惠说明：</span>
                        <span>{"无该字段"}</span>
                    </Col>
                </Row>
            </Panel>

            <Panel header="停车场设施-基本信息" key="2">
                <Divider className={"collapse-panel-divider"}/>

                <Row className={"record-task-row"}>
                    <Col span={8}>
                        <span>停车场名称：</span>
                        <span>{recordTask?.name}</span>
                    </Col>
                    <Col span={8}>
                        <span>所在地区：</span>
                        <span>{recordTask?.districtName}</span>
                    </Col>
                    <Col span={8}>
                        <span>详细地址：</span>
                        <span>{recordTask?.address}</span>
                    </Col>
                </Row>

                <Row className={"record-task-row"}>
                    <Col span={8}>
                        <span>入口经纬度：</span>
                        <span>{recordTask?.entranceLongitude}，</span>
                        <span>{recordTask?.entranceLatitude}</span>
                    </Col>
                    <Col span={16}>
                        <span>停车场等级：</span>
                        <span>{recordTask.parkLevel === 0 ? "普通" : "特级"}</span>
                    </Col>
                </Row>

                <Row className={"record-task-row"}>
                    <Col span={8}>
                        <span>停车场类型：</span>
                        <span>{recordTask?.parkLotType === 1 ? "配建" : "公共"}</span>
                    </Col>
                    <Col span={8}>
                        <span>室内外类型：</span>
                        <span>{recordTask?.parkLotRommType === 1 ? "室内" : "室外"}</span>
                    </Col>
                    <Col span={8}>
                        <Row>
                            <Col span={13}>
                                <span>建设工程竣工规划核实确认书：</span>
                            </Col>
                            <Col span={11}>
                                <FileLink fileName={"建设工程竣工规划核实确认书"}/>
                            </Col>
                        </Row>
                    </Col>
                </Row>

                <Row className={"record-task-row"}>
                    <Col span={8}>
                        <span>用地性质：</span>
                        <span>{getLandUseNature(recordTask?.landUseNature)}</span>
                    </Col>
                    <Col span={8}>
                        <span>规划车位（个）：</span>
                        <span>{recordTask?.planParkCount}</span>
                    </Col>
                    <Col span={8}>
                        <span>停车库场建筑规模：</span>
                        <span>{getParkLotScale(recordTask?.parkLotScale)}</span>
                    </Col>
                </Row>

                <Row className={"record-task-row"}>
                    <Col span={8}>
                        <span>已售车位数（个）：</span>
                        <span>{recordTask?.saleParkCount}</span>
                    </Col>
                    <Col span={8}>
                        <span>对外经营车位数：</span>
                        <span>{recordTask?.externalParkCount}</span>
                    </Col>
                    <Col span={8}>
                        <span>停车库场建筑规模：</span>
                        <span>{getParkLotScale(recordTask?.parkLotScale)}</span>
                    </Col>
                </Row>

                <Row className={"record-task-row"}>
                    <Col span={8}>
                        <span>停车位清单：</span>
                        <span>{100}</span>
                    </Col>
                    <Col span={8}>
                        <span>停车场面积：</span>
                        <span>{recordTask?.parkArea}</span>
                    </Col>
                    <Col span={8}>
                        <Row>
                            <Col span={11}>
                                <span>分层填写（停车场面积）：</span>
                            </Col>
                            <Col span={13}>
                                <span>{recordTask?.parkAreaDesc}</span>
                            </Col>
                        </Row>
                    </Col>
                </Row>

                <Row className={"record-task-row"}>
                    <Col span={8}>
                        <span>无障碍停车位数（个）：</span>
                        <span>{recordTask?.noObstacleParkCount}</span>
                    </Col>
                    <Col span={8}>
                        <span>充电车位数（个）：</span>
                        <span>{recordTask?.chaegePileParkCount}</span>
                    </Col>
                    <Col span={8}>
                        <Row>
                            <Col span={10}>
                                <span>充电桩达标证明材料：</span>
                            </Col>
                            <Col span={14}>
                                <FileLink fileName={"充电桩达标证明材料"}/>
                            </Col>
                        </Row>
                    </Col>
                </Row>

                <Row className={"record-task-row"}>
                    <Col span={8}>
                        <span>微型车位数（个）：</span>
                        <span>{recordTask?.microParkCount}</span>
                    </Col>
                    <Col span={8}>
                        <span>卸货车位数（个）：</span>
                        <span>{recordTask?.dischargeParkCount}</span>
                    </Col>
                    <Col span={8}>
                        <span>机械式停车位数（个）：</span>
                        <span>{recordTask?.mechanicalParkCount}</span>
                    </Col>
                </Row>

                <Row className={"record-task-row"}>
                    <Col span={8}>
                        <span>普通车位数（个）：</span>
                        <span>{recordTask?.commonParkCount}</span>
                    </Col>
                    <Col span={8}>
                        <span>出入口数量：</span>
                        <span>{recordTask?.entranceExitScale}</span>
                    </Col>
                    <Col span={8}>
                        <span>出入口车道数量：</span>
                        <span>{recordTask?.entranceExitLaneScale}</span>
                    </Col>
                </Row>

                <Row className={"record-task-row"}>
                    <Col span={8}>
                        <span>摩托车车位数（个）：</span>
                        <span>{"无该字段"}</span>
                    </Col>
                    <Col span={16}>
                        <span>自行车车位数（含电动）：</span>
                        <span>{"无该字段"}</span>
                    </Col>
                </Row>

                <Row className={"record-task-row"}>
                    <Col span={24}>
                        <span>位置属性：</span>
                        <span>{recordTask?.positionProperty}</span>
                    </Col>
                </Row>
            </Panel>

            <Panel header="停车场设施-附属设施" key="3">
                <Divider className={"collapse-panel-divider"}/>

                <Row className={"record-task-row"}>
                    <Col span={8}>
                        <span>停车诱导系统：</span>
                        <span>{recordTask?.guideSystemType}</span>
                    </Col>
                    <Col span={8}>
                        <span>洗车场：</span>
                        <span>{recordTask?.haveCarWash === 0 ? "无" : "有"}</span>
                    </Col>
                    <Col span={8}>
                        <span>网络及通信信号：</span>
                        <span>{recordTask?.netAndSignalPercent}</span>
                    </Col>
                </Row>

                <Row className={"record-task-row"}>
                    <Col span={8}>
                        <span>立体停车类型：</span>
                        <span>{recordTask?.solidParkType}</span>
                    </Col>
                    <Col span={8}>
                        <span>消防设施：</span>
                        <span>{recordTask?.fireFighting}</span>
                    </Col>
                    <Col span={8}>
                        <span>公共卫生间：</span>
                        <span>{recordTask?.publicToiletCount}</span>
                    </Col>
                </Row>

                <Row className={"record-task-row"}>
                    <Col span={8}>
                        <span>停车管理系统：</span>
                        <span>{recordTask?.haveParkSystem === 0 ? "无" : "有"}</span>
                    </Col>
                    <Col span={16}>
                        <span>是否预留数据接口：</span>
                        <span>{recordTask?.isPreSaveDataInterface}</span>
                    </Col>
                </Row>

                <Row className={"record-task-row"}>
                    <Col span={8}>
                        <span>智能化电子收费系统：</span>
                        <span>{recordTask?.intelligentElectricChargeSystem}</span>
                    </Col>
                    <Col span={8}>
                        <span>监控系统：</span>
                        <span>{recordTask?.monitorSystemPercent}%</span>
                    </Col>
                    <Col span={8}>
                        <span>照明设施：</span>
                        <span>{recordTask?.haveLightingFacility === 0 ? "无" : "有"}</span>
                    </Col>
                </Row>

                <Row className={"record-task-row"}>
                    <Col span={8}>
                        <span>应急照明系统：</span>
                        <span>{recordTask?.haveUrgeLightingSystem === 0 ? "无" : "有"}</span>
                    </Col>
                    <Col span={8}>
                        <span>通风系统：</span>
                        <span>{recordTask?.haveVentilationSystem === 0 ? "无" : "有"}</span>
                    </Col>
                    <Col span={8}>
                        <span>停车定位器：</span>
                        <span>{recordTask?.haveParkPosition === 0 ? "无" : "有"}</span>
                    </Col>
                </Row>

                <Row className={"record-task-row"}>
                    <Col span={8}>
                        <span>停车场道路硬化：</span>
                        <span>{recordTask?.haveRoadHarden === 0 ? "无" : "有"}</span>
                    </Col>
                    <Col span={8}>
                        <span>道闸：</span>
                        <span>{recordTask?.haveBarrier === 0 ? "无" : "有"}</span>
                    </Col>
                    <Col span={8}>
                        <span>内墙及顶面是否经过饰面处理：</span>
                        <span>{recordTask?.wallAndCeillingIsDecoration === 0 ? "无" : "有"}</span>
                    </Col>
                </Row>

                <Row className={"record-task-row"}>
                    <Col span={8}>
                        <span>标线、标牌、反光标志情况：</span>
                        <span>{recordTask?.signage}</span>
                    </Col>
                    <Col span={8}>
                        <span>现场收费公示牌(个)：</span>
                        <span>{recordTask?.spotFeePublicBrand}</span>
                    </Col>
                    <Col span={8}>
                        <span>充电桩数量(个)：</span>
                        <span>{recordTask?.chargePileCount}</span>
                    </Col>
                </Row>

                <Row className={"record-task-row"}>
                    <Col span={8}>
                        <span>有收费和安保人员：</span>
                        <span>{"无该字段"}</span>
                    </Col>
                    <Col span={8}>
                        <span>实行24小时服务：</span>
                        <span>{"无该字段"}</span>
                    </Col>
                    <Col span={8}>
                        <span>有明确的停车范围：</span>
                        <span>{"无该字段"}</span>
                    </Col>
                </Row>

                <Row className={"record-task-row"}>
                    <Col span={8}>
                        <span>停车场购买保险：</span>
                        <span>{"无该字段"}</span>
                    </Col>
                    <Col span={8}>
                        <span>消防通道畅通：</span>
                        <span>{"无该字段"}</span>
                    </Col>
                    <Col span={8}>
                        <span>语音播报系统：</span>
                        <span>{"无该字段"}</span>
                    </Col>
                </Row>

                <Row className={"record-task-row"}>
                    <Col span={8}>
                        <span>单向通道宽度（米）：</span>
                        <span>{"无该字段"}</span>
                    </Col>
                    <Col span={8}>
                        <span>双向通道宽度（米）：</span>
                        <span>{"无该字段"}</span>
                    </Col>
                    <Col span={8}>
                        <span>车行道高度（米）：</span>
                        <span>{"无该字段"}</span>
                    </Col>
                </Row>

                <Row className={"record-task-row"}>
                    <Col span={8}>
                        <span>车库配置直通电梯：</span>
                        <span>{"无该字段"}</span>
                    </Col>
                    <Col span={8}>
                        <span>地面是否进行防尘耐磨处理：</span>
                        <span>{"无该字段"}</span>
                    </Col>
                    <Col span={8}>
                        <span>车行道与电梯口、安全出入口等功能：</span>
                        <span>{"无该字段"}</span>
                    </Col>
                </Row>
            </Panel>

            <Panel header="相关附件" key="4">
                <Divider className={"collapse-panel-divider"}/>

                <Row className={"record-task-row"}>
                    <Col span={8}>
                        <Row>
                            <Col span={11}>
                                <span>现场勘查表+备案申请表：</span>
                            </Col>
                            <Col span={13}>
                                <FileLink fileName={"现场勘查表"}/>
                                <br/>
                                <FileLink fileName={"备案申请表"}/>
                                <br/>
                            </Col>
                        </Row>
                    </Col>
                    <Col span={8}>
                        <Row>
                            <Col span={10}>
                                <span>停车场产权单位证明：</span>
                            </Col>
                            <Col span={14}>
                                <FileLink fileName={"现场勘查表"}/>
                            </Col>
                        </Row>
                    </Col>
                    <Col span={8}>
                        <Row>
                            <Col span={8}>
                                <span>使用权证明材料：</span>
                            </Col>
                            <Col span={16}>
                                <FileLink fileName={"现场勘查表"}/>
                            </Col>
                        </Row>
                    </Col>
                </Row>

                <Row className={"record-task-row"}>
                    <Col span={8}>
                        <Row>
                            <Col span={11}>
                                <span>管理单位工商营业执照：</span>
                            </Col>
                            <Col span={13}>
                                <FileLink fileName={"管理单位工商营业执照"}/>
                                <br/>
                            </Col>
                        </Row>
                    </Col>
                    <Col span={16}>
                        <Row>
                            <Col span={2}>
                                <span>介绍信：</span>
                            </Col>
                            <Col span={22}>
                                <FileLink fileName={"介绍信"}/>
                                <FileLink fileName={"介绍信"}/>
                                <FileLink fileName={"介绍信"}/>
                                <FileLink fileName={"介绍信"}/>
                            </Col>
                        </Row>
                    </Col>
                </Row>

                <Row className={"record-task-row"}>
                    <Col span={5}>
                        <span>建设工程竣工规划核实确认书：</span>
                    </Col>
                    <Col span={19}>
                        <FileLink fileName={"建设工程竣工规划核实确认书"}/>
                        <FileLink fileName={"建设工程竣工规划核实确认书"}/>
                    </Col>
                </Row>

                <Row className={"record-task-row"}>
                    <Col span={2}>
                        <span>交通组织图：</span>
                    </Col>
                    <Col span={22}>
                        <FileLink fileName={"交通组织图"}/>
                    </Col>
                </Row>


                <Row className={"record-task-row"}>
                    <Col span={3}>
                        <span>停车场设施清单：</span>
                    </Col>
                    <Col span={21}>
                        <FileLink fileName={"停车场设施清单"}/>
                    </Col>
                </Row>

                <Row className={"record-task-row"}>
                    <Col span={8}>
                        <Row>
                            <Col span={11}>
                                <span>经营服务及安全管理制度：</span>
                            </Col>
                            <Col span={13}>
                                <FileLink fileName={"经营服务及安全管理制度"}/>
                                <br/>
                            </Col>
                        </Row>
                    </Col>
                    <Col span={8}>
                        <Row>
                            <Col span={9}>
                                <span>管理运营维护方案：</span>
                            </Col>
                            <Col span={15}>
                                <FileLink fileName={"管理运营维护方案"}/>
                            </Col>
                        </Row>
                    </Col>
                    <Col span={8}>
                        <Row>
                            <Col span={7}>
                                <span>应急处置预案：</span>
                            </Col>
                            <Col span={17}>
                                <FileLink fileName={"应急处置预案"}/>
                            </Col>
                        </Row>
                    </Col>
                </Row>

                <Row className={"record-task-row"}>
                    <Col span={1}>
                        <span>其他：</span>
                    </Col>
                    <Col span={23}>
                        <FileLink fileName={"补充文件"}/>
                    </Col>
                </Row>
            </Panel>
        </Collapse>
    );
}

export default Detail;